{include admin.inc.header}

{include admin.inc.top}

<div class="container-fluid content-body">
	<div class="main">
		{include admin.inc.menu}

		<section class="right-section" id="right-section">
			<!-- start of inner-frame -->
			<div class="inner-iframe">

				<ul class="breadcrumb">
					<li>
						<i class="glyphicon glyphicon-home"></i>
						<span>当前位置：</span>
						<a href="#">{$breadcrumb[0]}</a>
						<i class="glyphicon glyphicon-chevron-right"></i>
						<a href="#">{$breadcrumb[1]}</a>
					</li>
				</ul>

				<!-- Nav tabs -->
				<!-- Nav tabs -->
				<ul class="nav nav-tabs">
					<li><a href="{$add_url}"><i class="glyphicon glyphicon-plus"></i> 添加管理员</a></li>
					<li class="active"><a href="{$index_url}"><i class="glyphicon glyphicon-th-list"></i> 管理员列表</a></li>
					<li><a href="javascript:void(0);"><i class="glyphicon glyphicon-edit"></i> 编辑管理员</a></li>
				</ul>

				<div class="inner-container">

					<!-- search form start -->
					<form class="form-inline form-search" role="form" id="search-form" autocomplete="off">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">姓名</div>
								<input type="text" name="name" value="{$params[name]}" class="form-control input-sm">
							</div>
						</div>

						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">手机号码</div>
								<input type="text" name="mobile" value="{$params[mobile]}" class="form-control input-sm">
							</div>
						</div>

						<button type="submit" class="btn btn-success btn-sm">
							<i class="glyphicon glyphicon-search"></i> 搜索</button>
					</form><!-- END search form -->


					<form id="J_List_Form" autocomplete="off">
						<div class="table-responsive">
							<table class="table table-bordered table-hover" id="J_List_Table">
								<thead>
								<tr>
									<th width="20"><input type="checkbox" class="icheck check-all" /></th>
									<th>用户名</th>
									<th>姓名</th>
									<th>手机号码</th>
									<th>工号</th>
									<th>角色</th>
									<th>最后登陆时间</th>
									<th>最后登陆IP</th>
									<th>当前状态</th>
									<th>添加时间</th>
									<th>登录次数</th>
									<th>操作</th>
								</tr>
								</thead>
								<tbody>
								{if empty($items)}
								<tr>
									<td class="no-records text-center">{$noRecords}</td>
								</tr>
								{/if}
								{loop $items $value}
								<tr>
									<td><input type="checkbox" class="icheck" name="ids[]" id="checkbox_row_{$value[id]}" /></td>
									<td><label for="checkbox_row_{$value[id]}">{$value[username]}</label></td>
									<td>{$value[name]}</td>
									<td>{$value[mobile]}</td>
									<td>{$value[jobno]}</td>
									<td>{expr $value[role_name]?$value[role_name]:'超级管理员'}</td>
									<td>{$value[last_login_time]}</td>
									<td>{$value[last_login_ip]}</td>
									<td>
										<input type="checkbox" data-id="{$value[id]}" data-field="status" class="bswitch bswitch-list" data-size="mini"
											   {if $value[status]==1}checked{/if} data-on-text="启用" data-off-text="禁用">
									</td>
									<td>{$value[addtime]}</td>
									<td>{$value[login_times]}</td>
									<td>
										<a href="{$edit_url}/?id={$value[id]}" class="btn btn-primary btn-xs">
											<i class="glyphicon glyphicon-edit"></i> 修改</a>
										<a href="{$delete_url}/?id={$value[id]}" class="btn btn-danger btn-xs item-remove">
											<i class="glyphicon glyphicon-trash"></i> 删除</a>
									</td>
								</tr>
								{/loop}
								</tbody>
							</table>
						</div>
					</form>

					<div class="text-right">
						{$pagemenu}
					</div>

				</div>

			</div><!-- end of inner -->
		</section>

	</div>
</div>

{include admin.inc.footer}

<script>
	seajs.use("manager", function(exports) {
		exports.init({
			set_url : '/admin/manager/set/'
		});
	});
</script>
</body>
</html>
